// NonInviteTransaction.h: interface for the CNonInviteTransaction class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_NONINVITETRANSACTION_H__86F95B3D_A6A8_447D_9B80_01F6AFFDCAD8__INCLUDED_)
#define AFX_NONINVITETRANSACTION_H__86F95B3D_A6A8_447D_9B80_01F6AFFDCAD8__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "Transaction.h"
class CSIPStack;
class CNonInviteTransaction : public CTransaction  
{
public:	
	typedef enum{
		Ready,
		Trying,
		Proceeding,
		Completed,
		Terminated,
	}TCStateMachine;
	void AddRequestMessage(CSIPMessage *pmsg);
	void SendRequest(CSIPMessage &msg);
	void SendResponse(CSIPMessage &msg);
	BOOL IsTerminated(){return m_StateMachine == Terminated;};
	void Process();

    void AfterSendMsg(int stateMachine_Next);
    void AddRecvMessage(CSIPMessage *pmsg);
    
	CNonInviteTransaction(const char *ptid,CSIPStack *pstack,bool client);
	virtual ~CNonInviteTransaction();
private:
    
	TCStateMachine	m_StateMachine;
   	uint32			m_nTimerF;
	uint32			m_nTimerE;
	uint32			m_nTimerK;
	uint32			m_nTimerJ;
};

#endif // !defined(AFX_NONINVITETRANSACTION_H__86F95B3D_A6A8_447D_9B80_01F6AFFDCAD8__INCLUDED_)
